import matplotlib.pyplot as plt
import platgo as pg


problem = pg.problems.ZDT1()
maxgen = 100
N = 100

Algorithm = pg.algorithms.SPEA2(maxgen=maxgen, problem=problem)

pop = Algorithm.go(N=N)
print(pop)
pf = problem.get_optimal()
plt.plot(pf[:, 0], pf[:, 1])
Algorithm.draw()
